package com.norma.macaron.service.common.repository.user;

import com.norma.macaron.service.common.domain.user.TMenu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MenuRepository extends JpaRepository<TMenu, String>, JpaSpecificationExecutor<TMenu> {

    @Query("select menu from TMenu menu where menu.id in :ids")
    List<TMenu> queryByIds(@Param("ids") String[] ids);

}
